#ifndef _OI_PLSCANNERCORE_DEFINED_HPP_
#define _OI_PLSCANNERCORE_DEFINED_HPP_
#include <QTime>
namespace Oi
{
    namespace PLScannerCore
    {
        typedef QList<QPointF> OiProfile;
        typedef QList<OiProfile> OiProfiles;
        typedef QMap<QString, QVariant> OiResultData;
        class OI_PLSCANNER_CORE_API PLScanner
        {
        public:
            void init();
            void exit();
            QFileInfoList FindFile(const QString& strFilePath, const QString& strNameFilters);
            void loadOEM();

        public:
            QList<QPointF> loadCSV(QString fileName);
            void saveCSV(QString fileName, QList<QPointF>);

            void saveCalibRecord(double temp1, double temp2, double value);

        public:
            static QString OiCompanyName();
            static QString OiSoftName();

        public:
            static PLScanner* instance();

        public:
            QString company;
            QString companyLocal;
            QString companyType;
            QString softName;
            QString softVersion;
            QString manual;
            QString companyLogo;
            QString icon;
            QString companyBanner;

        public:
            QString resourceName;
            QString themeName;

        public:
            bool super;
            bool simulation;
            bool admin;
            bool running;
            bool debugging;
            QTimer* _pTimer;
        public:
            QString rootDir;
            QString projectDir;
            QString productDefaultDir;
            QString productDir;
            QString imgDir;
            QString excelDir;
            QString recordDir;
            QString localDataDir;
            QString dataDir;
            QString correctedDataDir;

        public:
            QString modbusTcp_Addr;
            QString modbusTcp_Port;
            QString modbusTcp_Name;

        public:
            double acquireVel;
            bool acquireDir;
            int captureTimeout;
            double sideLen;
            double pointMeasureInterval;
            int zeroMethod;
            double resolution;
            int widthHide;
            int formalType;
            bool sideCorrect;
            bool filter;
            int filterLen;

        public:
            double thicknessWTDefault;
            double thicknessETDefault;
            double widthWTDefault;
            double widthETDefault;
            double edgeThickness;
            double compensation;
            int profileDispalyOption;
            int precisionDefault;


        public:
            bool wideCalibEnable;
            bool autoCalib;
            double calibPos;
            double calibInterval;
            QList<QPointF> wideCalib_P;
            bool saveCorrectedData;

        public:
            int paramMode;
            double switchDelayStopTime;
            double switchDelayStartTime;

        public:
            double measureOffsetY;
            double measureOffsetY_S;
            double measureOffsetX1;
            double measureOffsetX2;
            double measureOffsetX;

        public:
            int elWidthOption;

        public:
            int measureAcqPointMethod;
            int measureAcqPointLen;
        };

    }
}

#endif